Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udpate versions (pom and property) in the same run #272

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

lalmeras
Copy link
Contributor

@lalmeras lalmeras commented Jan 1, 2021

If versions:set and versions:set-property are launched in separate maven commands, versions:set-property can fail as poms are in an inconsistent state.

Attached test case shows a practical use-case where a property is used in dependencyManagement declaration in a multi-module project.

If project is not installed, versions:set-property 1.0.1-SNAPSHOT -> 1.0.1 fails as maven tries to resolve dependency 1.0.1-SNAPSHOT in a project already versionned in 1.0.1.

This PR builds a unique maven command, adding conditionally versions:set and versions:set-property parameters.

If versions:set and versions:set-property are launched in separate
maven commands, versions:set-property can fail as poms are in an
inconsistent state.

Attached test case shows a practical use-case where a property is used
in dependencyManagement declaration in a multi-module project.

If project is not installed, versions:set-property 1.0.1-SNAPSHOT ->
1.0.1 fails as maven tries to resolve dependency 1.0.1-SNAPSHOT in a
project already versionned in 1.0.1.
@aleksandr-m aleksandr-m merged commit fa4ee0e into aleksandr-m:master Jan 26, 2021
@aleksandr-m
Copy link
Owner

@lalmeras Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants